/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.tarena.lbs.attach.api;

import com.tarena.lbs.attach.pojo.dto.AttachDTO;
import com.tarena.lbs.attach.pojo.dto.AttachQrDTO;
import com.tarena.lbs.attach.pojo.param.AttachQRParam;
import com.tarena.lbs.attach.pojo.param.PicUpdateParam;
import com.tarena.lbs.attach.pojo.query.AttachQuery;

import java.util.List;

public interface AttachApi {

    /**
     * 根据查询条件获取附件信息
     *
     * @param attachQuery 查询参数
     * @return 附件信息列表
     */
    List<AttachDTO> getAttachInfo(AttachQuery attachQuery);

    /**
     * 批量更新业务图片信息
     *
     * @param picParams 图片更新参数列表
     * @return 是否更新成功
     */
    boolean batchUpdateBusiness(List<PicUpdateParam> picParams);

    /**
     * 生成二维码
     *
     * @param attachQRParam 二维码生成参数
     * @return 二维码信息
     */
    AttachQrDTO generateQrCode(AttachQRParam attachQRParam);

    /**
     * 业务图片绑定接口
     *
     * @param picParams 图片绑定参数列表
     * @return 是否绑定成功
     */
    boolean bindBusinessPics(List<PicUpdateParam> picParams);

    /**
     * 活动图片绑定接口
     *
     * @param picParams 图片绑定参数列表
     * @return 是否绑定成功
     */
    boolean bindActivityPics(List<PicUpdateParam> picParams);

    /**
     * 内容图片绑定接口
     *
     * @param picParams 图片绑定参数列表
     * @return 是否绑定成功
     */
    boolean bindContentPics(List<PicUpdateParam> picParams);

    /**
     * 生成优惠券二维码
     *
     * @param attachQRParam 二维码生成参数
     * @return 二维码信息
     */
    AttachQrDTO generateCouponQrCode(AttachQRParam attachQRParam);
    /**
     * 删除附件图片
     *
     * @param attachIds 附件ID列表
     * @return 是否删除成功
     */
    boolean deleteAttachPics(List<Integer> attachIds);

    /**
     * 根据业务ID删除关联图片
     *
     * @param businessId 业务ID
     * @param businessType 业务类型
     * @return 是否删除成功
     */
    boolean deletePicsByBusiness(String businessId, String businessType);

}
